﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="Resources" %><!doctype html>
<html>
<head runat="server">
    <link href="/Content/wml.css" rel="stylesheet" />
    <style type="text/css">
        body { font-size: 12px; } small { font-size: 10px; }
        table.sample td {
            border-width: 1px;
            padding: 1px;
            border-style: inset;
            border-color: #808080;
        }
        table.sample th {
            border-width: 1px;
            padding: 1px;
            border-style: inset;
            border-color: #808080;
            background-color: #CCCCCC;
        }
    </style>
    <title><%= Admin.SQLTop %></title>
</head>
<body style="max-width: 100%">
    <div class="top"><%= Admin.SQLTop %></div>
    <div class="panelr"><%= Admin.SQLTopPanel %></div>
<% if (ViewData["error"] != null)
        { %>
    <div class="block">
        <%= ViewData["error"]%>
    </div>
    <% } %>
    <% Html.BeginForm(); %>
        <div class="block">
            <textarea name="sql" rows="2" cols="20" id="TextBox1" style="height:400px; width:600px;"><%= ViewData["sql"] %></textarea>
        </div>
        <div class="block">
            <% 
                System.Collections.Generic.List<SelectListItem> list = new System.Collections.Generic.List<SelectListItem>();
                list.Add(new SelectListItem { Text = Admin.BasePrimary, Value = "primary" });
                list.Add(new SelectListItem { Text = Admin.BaseStatistic, Value = "statistic" });
               %>
            <%= Html.DropDownList("db", list) %>
        </div>
        <div class="block">
            <input type="submit" value="<%= Admin.SQLExec %>" />
        </div>
        <% if (ViewData["ResultData"] != null)
           { %>
        <div class="block">
            <%= ViewData["ResultData"]%>
        </div>
        <% } %>
    <% Html.EndForm(); %>
    <div class="footer">
      <small>
        <%= Html.ActionLink("^", "Index") %>
         | 
        <a href="?">_</a>
         | 
        <a href="?sql=1">1</a>
         | 
        <a href="?sql=2">2</a>
         | 
        <a href="?sql=3">3</a>
      </small>
    </div>
</body>
</html>
